from flask import Flask, request, Response, make_response, redirect
import time

app = Flask(__name__)


@app.route("/login")
def login():
    res = Response("add cookies")
    res.set_cookie(key="name", value="Will", expires=time.time()+6*60)
    return res

@app.route("/show")
def show():
    return request.cookies.__str__()

@app.route("/del")
def del_cookie():
    print(request.cookies)
    res = redirect("/show")
    res.set_cookie("name", "", expires=0)
    return res

if __name__ == "__main__":
    app.run(port=80)